A round of warning fixes for new issues.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 14 Feb 2014 17:15:05 +0000 (17:15 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 14 Feb 2014 17:15:05 +0000 (17:15 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4740 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/gui/dpencode.cc
gpsbabel/gui/dpencode.h
gpsbabel/gui/formatload.h
gpsbabel/gui/gmapdlg.h
gpsbabel/gui/processwait.cc
gpsbabel/gui/upgrade.h
gpsbabel/jeeps/gpsapp.cc
gpsbabel/shapelib/dbfopen.c

index 4fc683ec1e0cf7f8c0ccc4a25803d8289f560184..4ab5ec0204b6834bc49e950eca65f0b05aeed692 100644 (file)
@@ -36,7 +36,7 @@ using std::string;
 
 //------------------------------------------------------------------------
 PolylineEncoder::PolylineEncoder(int numLevels, double zoomFactor, double vs):
-  numLevels(numLevels), zoomFactor(zoomFactor), verySmall(vs)
+  numLevels(numLevels), verySmall(vs)
 {
   if (verySmall <=0.0)
     verySmall = 1.0E-5;
index feb9b2213c2458336834d6b77c5d7be3107eaeef..c18d80646921eebdb23b57d3b49fb22f7cac9c51 100644 (file)
@@ -45,7 +45,6 @@ private:
                       const vector <double> &dists);
 
   int numLevels;
-  double zoomFactor;
   double verySmall;
   vector <double> zoomLevelBreaks;
 };
index 472a670596bd7b811c41180863ea8c0918cfd8c6..0fd0fe1a5a7537c747b49195e3d39657c55fae2b 100644 (file)
@@ -29,7 +29,7 @@
 
 class FormatLoad {
  public:
-  FormatLoad() {};
+  FormatLoad() : currentLine_(0) {};
   ~FormatLoad() {};
   
   bool getFormats(QList<Format> &formatList);
index 8c67d05429153d405b372a52c24cad7203627559..4f8d61c3a33fd527d7dbad63d19b16de5e0ec809 100644 (file)
@@ -39,7 +39,6 @@ Q_OBJECT
  private:
   Ui_GMapDlg ui_;
   Map *mapWidget_;
-  bool showWaypoints_, showRoutes_, showTracks_;
   QStandardItemModel *model_;
   QStandardItem *wptItem_, *trkItem_, *rteItem_;
   QList<QStandardItem *> wptList_, trkList_, rteList_;
index f3919e3dc1fde5f4f4395f11194e0f6384d772a5..6160b73a86746be70ebaaae07e835f48072690ab 100644 (file)
@@ -109,6 +109,7 @@ ProcessWaitDialog::ProcessWaitDialog(QWidget *parent, QProcess *process):
   timer_->setSingleShot(false);
   connect(timer_, SIGNAL(timeout()), this, SLOT(timeoutX()));
   stopCount_ = -1;
+  ecode_ = 0;
   timer_->start();
   errorString_ = "";
 
index 589d8629988c13e51fd8068d683a10819187c334..7d8865010b8843a3df7b9e6ba191e7960bedbd89 100644 (file)
@@ -50,11 +50,9 @@ protected:
 
 private:
   QString currentVersion_;
-  int upgradeCheckMethod_;
   QNetworkAccessManager* manager_;
   QNetworkReply* replyId_;
   QUrl upgradeUrl_;
-  bool httpRequestAborted_;
   QString latestVersion_;
   QDateTime upgradeWarningTime_;  // invalid time if this object never issued.
   QList<Format> &formatList_;
index 7a6108ef87cd5f909359cae71896e20e0fb9bc2d..65e2c61f86c865a3d5fb3cfa399d4e0e1727e36a 100644 (file)
@@ -220,7 +220,9 @@ static int32 GPS_A000(const char* port)
     return SERIAL_ERROR;
   }
 
-  GPS_Packet_Read(fd, &rec);
+  if (!GPS_Packet_Read(fd, &rec)) {
+    return gps_errno;
+  }
   GPS_Send_Ack(fd, &tra, &rec);
 
   id = GPS_Util_Get_Short(rec.data);
@@ -881,7 +883,9 @@ int32 GPS_A100_Get(const char* port, GPS_PWay** way, int (*cb)(int, GPS_PWay*))
     return FRAMING_ERROR;
   }
 
-  GPS_Packet_Read(fd, &rec);
+  if (!GPS_Packet_Read(fd, &rec)) {
+    return gps_errno;
+  }
   GPS_Send_Ack(fd, &tra, &rec);
 
   n = GPS_Util_Get_Short(rec.data);
@@ -1152,7 +1156,9 @@ int32 GPS_A101_Get(const char* port)
     return FRAMING_ERROR;
   }
 
-  GPS_Packet_Read(fd, &rec);
+  if (!GPS_Packet_Read(fd, &rec)) {
+    return gps_errno;
+  }
   GPS_Send_Ack(fd, &tra, &rec);
 
   n = GPS_Util_Get_Short(rec.data);
index fbe7b06575f640fa327d1d73ff28399cd5777f65..552b843775100c5f53f16f5f79125919ede14cd3 100644 (file)
@@ -693,8 +693,11 @@ DBFCreateLL( const char * pszFilename, const char * pszCodePage, SAHooks *psHook
     psHooks->FClose( fp );
 
     fp = psHooks->FOpen( pszFullname, "rb+" );
-    if( fp == NULL )
+    if( fp == NULL ) {
+        free(pszBasename);
+        free(pszFullname);
         return( NULL );
+    }
 
 
     sprintf( pszFullname, "%s.cpg", pszBasename );